﻿<div ng-controller="host.views.maintenance.index as vm">
    <div class="row margin-bottom-5">
        <div class="col-xs-12">
            <div class="page-head">
                <div class="page-title">
                    <h1>
                        <span>@L("Maintenance")</span>
                    </h1>
                </div>
            </div>
        </div>
    </div>
    <div class="portlet light margin-bottom-0">
        <div class="portlet-body">
            <uib-tabset class="tab-container tabbable-line">

                <uib-tab heading="@L("Caches")">
                    <div class="row margin-bottom-10">
                        <div class="col-xs-6">
                            <p>@L("CachesHeaderInfo")</p>
                        </div>
                        <div class="col-xs-6 text-right">
                            <button class="btn blue" ng-click="vm.clearAllCaches()"><i class="fa fa-refresh"></i> @L("ClearAll")</button>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <table class="table table-striped table-hover table-bordered">
                                <tbody>
                                <tr ng-repeat="cache in vm.caches">
                                    <td>
                                        <span>{{cache.name}}</span>
                                        <button class="btn btn-xs blue pull-right" ng-click="vm.clearCache(cache.name);">
                                            @L("Clear")
                                        </button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </uib-tab>

                <uib-tab heading="@L("WebSiteLogs")">
                    <div class="row margin-bottom-10">
                        <div class="col-xs-6">
                            <p>@L("WebSiteLogsHeaderInfo")</p>
                        </div>
                        <div class="col-xs-6 text-right">
                            <button class="btn blue" ng-click="vm.downloadWebLogs()"><i class="fa fa-download"></i> @L("DownloadAll")</button>
                            <button class="btn blue" ng-click="vm.getWebLogs()"><i class="fa fa-refresh"></i> @L("Refresh")</button>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="web-log-view full-height" ng-bind-html="vm.logs">
                            </div>
                        </div>
                    </div>
                </uib-tab>

            </uib-tabset>
        </div>
    </div>
</div>
